/**
 * 
 */
package ar.pmt.gwt.client.rpc;




import java.util.Collection;





import ar.pmt.vista.beans.RecursoBean;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;

import com.google.gwt.user.client.rpc.ServiceDefTarget;

/**
 * @author guille
 *
 */
public interface CommonManager extends RemoteService {
	
	Collection<RecursoBean> getRecursosPorPeticion(String unicoIdPeticion) throws Exception;
	
	RecursoBean getRecurso(String uid) throws Exception;

	String getRecursoJson(String uid) throws Exception;
	
	public static class Util {
		public static CommonManagerAsync getInstance() {
			CommonManagerAsync instance = (CommonManagerAsync) GWT
					.create(CommonManager.class);
			ServiceDefTarget target = (ServiceDefTarget) instance;
			target.setServiceEntryPoint("http://localhost:8031/PMT-GWT/handler/commonManager.rpc");
			return instance;			
		}
	}

}
